{  Statement: http://acmp.ru/?main=task&id_task=102
   Verdict: Accepted
}
uses
    SysUtils, Math;

const
    MAXN = 3;

type
        pt = record
        x, y : int64;
        end;

        apt = array[1..MAXN] of pt;
    
var
    p : apt;
    pp : pt;

function isInside(pp : pt; p : apt) : boolean;

var
    i : longint;

    function check(x : longint) : boolean;

    var
        c, t : pt;

        function vect(x1, y1, x2, y2 : int64) : int64;
        begin
        result := x1 * y2 - x2 * y1;
        end;

    begin
        if x = MAXN then c := p[1] else c := p[x + 1];
    if x = MAXN then t := p[2] else 
    if x = MAXN - 1 then t := p[1] else t := p[MAXN];
    result := vect(pp.x - p[x].x, pp.y - p[x].y, c.x - p[x].x, c.y - p[x].y) * vect(t.x - p[x].x, t.y - p[x].y, c.x - p[x].x, c.y - p[x].y) >= 0;
    end;

begin
    result := true;
    for i := 1 to MAXN do
        if not check(i) then begin
            result := false;
            break;
        end;
end;
    
begin
    reset(input,'input.txt');
    rewrite(output,'output.txt');
    read(p[1].x, p[1].y, p[2].x, p[2].y, p[3].x, p[3].y, pp.x, pp.y);
    if isInside(pp, p) then write('In') else write('Out');
end.